﻿using System;

namespace BSharp.Compiler
{
	public class AutoDeclaration : AstNode
	{
		public readonly string Name;
		public readonly AstNode Value;

		public AutoDeclaration (SourceLocation location, string name, AstNode value)
			: base (location)
		{
			Name = name;
			Value = value;
		}

		public override void Visit (AstVisitor visitor)
		{
			visitor.Accept (this);
		}

		public override void VisitChildren (AstVisitor visitor)
		{
			Value.Visit (visitor);
		}
	}
}

